package com.wnhz.wnmap.order.handler;

import com.wnhz.wnmap.common.result.HttpResp;
import io.seata.core.exception.TransactionException;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class SeataExceptionHandler {

    @ExceptionHandler(TransactionException.class)
    public HttpResp handleSeata(TransactionException e){
        return HttpResp.failed(e.getMessage());
    }
}
